<?php
if (!defined('IN_XLP')) {
    exit('Access Denied');
}
$Document = array(
    'pageid' => 'login', //页面标示
    'pagename' => '欢迎登陆', //当前页面名称
    'mycss' => array(), //加载的css样式表
    'myjs' => array(), //加载的js脚本
	'footerjs'=>array(),
    'head' => true, //加载头部文件
);
include getTpl('header', 'public');
?>
<!-- header --> 
<!-- <header id="header" class="navbar bg bg-black"> 
 <a href="<?php echo U('login/index');?>" class="btn btn-link pull-right m-t-mini"><i class="fa fa-question fa-lg text-default"></i></a> 
 <a class="navbar-brand" href="#" style="float: none;"><img src="<?php echo IMG_PATH ?>content/tlogo.png"></a> 
</header>  -->
<style type="text/css">
.panel-login{
  background:#fafaf8;
  border: none;

}
.form-login{
    width: 85%;
    height:40px;
    float: right;
    border:1px solid #ded7ca;
}
.control-label{
    line-height: 35px;
}
.btn-login{
    width:170px;
    height:46px;
    background:#22baa0;
    display: block;
    margin: 0 auto; 
    margin-top: 35px;
}
.btn-login:hover{
  background:#22baa0;
}
.panel-login{
    padding:20px 40px;
    background: #fff;
}
.con-login{
  font-size: 18px;

}
</style>
<!-- / header --> 
<!-- header -->
<!--主体 开始-->
  <section id="content" style="width: 100%;height:100%;overflow: hidden;background-repeat: repeat;position: absolute; left: 0; top: 0;"> 
  <header id="header" class="navbar bg bg-black"> 
 <a href="<?php echo U('login/index');?>" class="btn btn-link pull-right m-t-mini"><i class="fa fa-question fa-lg text-default"></i></a> 
 <a class="navbar-brand" href="#">JustDry</a> 
</header> 
   <div class="main padder" style="width: 100%;height:100%;overflow: hidden;"> 
    <div class="row" > 
     <div class="col-lg-4 col-lg-offset-4 m-t-large"> 
      <section class="panel" style="margin:200px 0 0 0; border:none;"> 
       <header class="panel-heading text-center panel-login">
         <h3>Just Dry</h3>
         <span>就是干比价网后台管理</span>
        </header> 
       <form id="loginForm" action="" class="panel-body panel-login"> 
        <div class="block" style="margin-bottom: 29px;"> 
         <label class="control-label con-login">帐号</label> 
         <input type="text" id="user" name="user" placeholder="请输入帐号" class="form-control form-login"  /> 
        </div> 
        <div class="block"> 
         <label class="control-label con-login">密码</label> 
         <input type="password" id="password" name="password" placeholder="请输入密码" class="form-control form-login" /> 
        </div>
        <input name="refer" type="hidden" value="<?php echo $refer;?>">
      	<input name="__hash__" id="__hash__" value="<?php echo formHash();?>" type="hidden"/>
        <button type="submit" class="btn btn-info btn-login">登录</button> 
        <!-- <div class="line line-dashed"></div> -->
       </form> 
      </section> 
     </div> 
      <p style="width: 100%;height: auto;float: left; position: absolute; bottom: 2%; left: 0; text-align: center;"> <small>&copy;  就是干比价网管理系统</small> </p> 
    </div> 
   </div> 
  </section> 
<!--主体 结束-->
<script>
$(function(){
	$("#loginForm").submit(function(){
	  if (!$("#user").val()||!$("#password").val()){
		  Msg.error('请输入帐号和密码');
		  return false;
	  }
	  Msg.loading('正在登录，请稍候...');
	  $.post('<?php echo U('login/ajaxlogin');?>',$(this).serialize(),function(result){
		  Msg.hide();
		  if (result.status==1){
			   location.href=result.data.refer;
		  }else{
			   Msg.error(result.info);
		  }
	  },'json');
	  return false;
	})	
})
</script>
<?php
  getJs(array('content/global','content/facebox','content/msgbox'));
?>
</body>
</html>